package dao

import (
	"main/global"
	"main/internal/model"
)

func GetArticleById(id uint) model.Article {
	var result model.Article
	if err := global.DB.Where("id=?", id).Find(&result).Error; err != nil {
		return model.Article{}
	}
	return result
}
